package com.project.internship.controller;

import com.project.internship.entity.Menu;
import com.project.internship.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/system/menu")
public class MenuController {

    @Autowired
    MenuService menuService;

    @GetMapping("/")
    public List<Menu> getMenusByRoleId(){
        return menuService.getMenusByRoleId();
    }

}
